package com.shop.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠卷
 * </p>
 *
 * @author 小🌤
 * @since 2021-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Coupon implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 优惠卷id
     */
    @TableId(value = "cn_id", type = IdType.AUTO)
    private Integer cnId;

    /**
     * 优惠价格
     */
    private Double cnPrice;

    /**
     * 价格满多少才可以减
     */
    private Integer cnLimit;

    /**
     * 商品id
     */
    private Integer cmId;

    /**
     * 优惠卷的过期时间
     */
    private Date cnExpireDate;

    @TableField(exist = false)
    private Commodity commodity;

    /**
     * 判断用户是否领取该优惠卷
     */
    @TableField(exist = false)
    private boolean userIf;

}
